<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .sliderbar{
        position: relative;
        
        width: 300px;
        height: 100px;
        background-color: pink;
        overflow: hidden;
    }
    span{
        display: block;
        width: 300px;
        height: 40px;
        background-color: red;

    }
    .con{
       position: absolute;
       left: 0;
       top: 0;
        width: 300px;
        height: 40px;
        background-color: aqua;
        /* z-index: -1; */
    }
   
        
    </style>
</head>
<body>
    <div class="sliderbar">
        <span><——</span>
        <div class="con">问题反馈</div>
    </div>
    <script>
        // 获取元素
        var sliderbar = document.querySelector('.sliderbar');
        var con = document.querySelector('.con');
        // 当我们鼠标经过sliderbar的时候 让con盒子滑动到左侧
        // 当我们鼠标离开sliderbar的时候 让con盒子滑动到右侧
        sliderbar.addEventListener('mouseenter',function(){
            han(con,200,function(){
                sliderbar.children[0].innerHTML = '——>'
            })
        })
        sliderbar.addEventListener('mouseleave',function(){
            han(con,0,function(){
                sliderbar.children[0].innerHTML = '<——';
            })
        })

    </script>
    <script src="/js/动画函数.js"></script>
</body>
</html>